package com.itcast.utils

import java.util.Properties

import com.typesafe.config.{Config, ConfigFactory}

object ConfigHandler {
    private lazy val config: Config = ConfigFactory.load()
  //parquet文件所在路径
  val parquetPath = config.getString("parquet.path")
  //rpt.logdataAnalysis存储路径
   val rptPath = config.getString("rpt.logdataAnalysis")
  //配置mysql信息
  val dirver: String = config.getString("db.driver")
  val url: String = config.getString("db.url")
  val user: String = config.getString("db.user")
  val password: String = config.getString("db.password")
  val table: String = config.getString("db.logdataAnalysis.table")
  val areatable: String = config.getString("db.areaAnalysis.table")
  val mediatable: String = config.getString("db.mediaAnalysis.table")
  //封装mysql属性
   val dbProper = new Properties()
  dbProper.setProperty("dirver",dirver)
  dbProper.setProperty("user",user)
  dbProper.setProperty("password",password)

   val appdictPath: String = config.getString("appdict")

   val redisHost= config.getString("redis.host")
   val redisPort= config.getInt("redis.port")
   val redisdbIndex= config.getInt("redis.index")
}
